package com.emcom.gotour.utils;

import org.apache.commons.lang.StringUtils;

public class WebUtils {

	private final static String ENTER = "\n";
	private final static String BR = "<br/>";

	public static String htmlEscape(String text) {
		if(StringUtils.isNotEmpty(text)) {
			text = StringUtils.replace(text, ENTER, BR);
		}
		return text;
	}

	public static String textEscape(String text) {
		if(StringUtils.isNotEmpty(text)) {
			text = StringUtils.replace(text, BR, "");
		}
		return text;
	}

}
